﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Data;

public partial class activeperson : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
            Active5();
    }
    protected void Active5()
    {
        DBaccess db = new DBaccess();
        string sql = "select top 5 sid, mname,COUNT(sid) count from mr_download,mr_member where mr_download.sid=mr_member.mid group by sid,mname order by count(sid) desc";
        DataSet read = db.GetDataSet(sql);
        Label1.Text = read.Tables[0].Rows[0][1].ToString();
        Label2.Text = read.Tables[0].Rows[0][2].ToString();
        Label3.Text = read.Tables[0].Rows[1][1].ToString();
        Label4.Text = read.Tables[0].Rows[1][2].ToString();
        Label5.Text = read.Tables[0].Rows[2][1].ToString();
        Label6.Text = read.Tables[0].Rows[2][2].ToString();
        Label7.Text = read.Tables[0].Rows[3][1].ToString();
        Label8.Text = read.Tables[0].Rows[3][2].ToString();
        Label9.Text = read.Tables[0].Rows[4][1].ToString();
        Label10.Text = read.Tables[0].Rows[4][2].ToString();
     }
}